package com.xjgc.eip.panel.controller;


import org.jeecg.common.api.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xjgc.eip.panel.entity.ZxjEipGd;
import com.xjgc.eip.panel.service.ZxjEipGdService;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wxy
 * @since 2019-11-08
 */
@RestController
@RequestMapping("/zxjEipGd")
public class ZxjEipGdController {
    @Autowired
    private ZxjEipGdService zxjEipGdService;
    @RequestMapping("workList")
    public Result<IPage<ZxjEipGd>> workList(ZxjEipGd zxjEipGd, @RequestParam(name = "pageNo",defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize",defaultValue = "10") Integer pageSize){
        Result<IPage<ZxjEipGd>> result=new Result<>();
        Page<ZxjEipGd> page = new Page<ZxjEipGd>(pageNo,pageSize);
        QueryWrapper<ZxjEipGd> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(zxjEipGd);
        IPage<ZxjEipGd> pageList = zxjEipGdService.page(page,queryWrapper);
        result.setSuccess(true);
        result.setResult(pageList);
        return result;
    }
}

